﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Metodesa.Master" AutoEventWireup="true" CodeBehind="ListEmpleado.aspx.cs" Inherits="Metodesa.Views.Home.ListEmpleado" Title="Untitled Page" %>
<%@ Import namespace="Metodesa.Views.Home"%>
<%@ OutputCache Location="None"%>


<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server"> 

    
    <asp:TextBox ID="searchbox" runat="server"></asp:TextBox>
    
  
    &nbsp;<asp:Button ID="FindButton" runat="server" Text="Buscar" 
        PostBackUrl="~/Views/Home/ListEmpleado.aspx?" CausesValidation="False" 
        onclick="FindButton_Click" /> 
    &nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="PrepareAddButton" runat="server" Text="Agregar" 
        PostBackUrl="~/Views/Home/ListEmpleado.aspx?a=p" CausesValidation="False" 
        onclick="PrepareAddButton_Click"/>
     <asp:RadioButtonList ID="option" runat="server">
        <asp:ListItem Value="Ci">Cédula</asp:ListItem>
        <asp:ListItem Value="Name">Nombre</asp:ListItem>
        <asp:ListItem Value="LastName">Apellido</asp:ListItem>
    </asp:RadioButtonList>
    
    
    <asp:Panel ID="ListEmpleados" runat="server" Visible="False">
     <p>&nbsp;</p>

     </asp:Panel>
    
   
    <br />
    
    <asp:Label ID="label" runat="server" Text="Label" Visible="False"></asp:Label>
    
    <asp:Panel ID="PanelEditEmpleado" runat="server" Visible="False" 
        Width="486px">
        <p>&nbsp;</p>
        <table style="width:481px;">
            <tr>
                <td style="width: 24px">
                    Id </td>
                <td style="width: 90px">
                    Nombre <FONT color="red">*</FONT></td>
                <td style="width: 90px">
                    Apellido <FONT color="red">*</FONT></td>
                <td style="width: 90px">
                    Cédula <FONT ="red" color="Red">*</FONT></td>
                <td style="width: 90px">
                    Usuario</td>
                <td style="width: 91px">
                    Password</td>
            </tr>
            <tr>
                <td style="width: 24px">
                    <asp:Label ID="teId" runat="server" Font-Bold="True"></asp:Label>
                </td>
                <td style="width: 87px">
                    <asp:TextBox ID="teName" runat="server"  Width="87px" MaxLength="40"></asp:TextBox>
                    <asp:RequiredFieldValidator id="RequiredFieldNombre" runat="server"  
                        ControlToValidate="teName" Display="Dynamic"></asp:RequiredFieldValidator>
                </td>
                <td style="width: 87px">
                    <asp:TextBox ID="teLastName" runat="server" Width="87px" MaxLength="30" ></asp:TextBox>
                    <asp:RequiredFieldValidator id="RequiredFieldApellido" runat="server"  
                        ControlToValidate="teLastName" Display="Dynamic"></asp:RequiredFieldValidator>
                    
                </td>
                <td style="width: 87px">
 
                    <asp:TextBox ID="teCi" runat="server" Width="87px"></asp:TextBox>
                    <asp:RequiredFieldValidator id="RequiredFieldCedula" runat="server" ControlToValidate="teCi"></asp:RequiredFieldValidator>
                    <br/>
                    <asp:RegularExpressionValidator ID="validatorCedula" runat="server"    
                                    
                                    ControlToValidate="teCi" Display="Dynamic"/>
                    
                </td>
                <td style="width: 87px">
                    <asp:TextBox ID="teUser" runat="server" Width="87px" MaxLength="20"></asp:TextBox>
                </td>
                <td style="width: 88px">
                    <asp:TextBox ID="tePassword" runat="server" Width="88px" 
                        TextMode="Password" MaxLength="40"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    Dirección</td>
                <td colspan="2">
                    <asp:TextBox ID="teAddress" runat="server" TextMode="MultiLine" Width="181px" 
                        Height="49px" MaxLength="900"></asp:TextBox>
                </td>
                <td colspan="2" id="edit">
                    <asp:Button ID="EditButton" runat="server" 
                        Text="Modificar" PostBackUrl="~/Views/Home/ListEmpleado.aspx?a=e" 
                        onclick="EditButton_Click" />
                </td>
            </tr>
        </table>
     
  
    </asp:Panel>
    <asp:Panel ID="PanelAddEmpleado" runat="server" Height="131px" Visible="False" 
        Width="486px">
        <p>&nbsp;</p>
        <table style="width:481px;">
            <tr>
                <td style="width: 90px">
                    Nombre <font color="red">*</font></td>
                <td style="width: 90px">
                    Apellido <font color="red">*</font></td>
                <td style="width: 90px">
                    Cedula <font color="red">*</font></td>
                <td style="width: 90px">
                    Usuario</td>
                <td style="width: 91px">
                    Password</td>
            </tr>
            <tr>
                <td style="width: 87px">
                    <asp:TextBox ID="taName" runat="server"  Width="87px" MaxLength="50"></asp:TextBox>
                    <asp:RequiredFieldValidator id="RequiredFieldNombre2" runat="server"   
                        ControlToValidate="taName" Display="Dynamic"></asp:RequiredFieldValidator>
                    
                </td>
                <td style="width: 87px">
                    <asp:TextBox ID="taLastName" runat="server" Width="87px" MaxLength="50" ></asp:TextBox>
                    <asp:RequiredFieldValidator id="RequiredFieldApellido2" runat="server"  
                        ControlToValidate="taLastName" Display="Dynamic"></asp:RequiredFieldValidator>
                </td>
                <td style="width: 87px">
                    <asp:TextBox ID="taCi" runat="server" Width="87px" MaxLength="30"></asp:TextBox>
                    <asp:RequiredFieldValidator id="RequiredFieldCedula2" runat="server"   
                        ControlToValidate="taCi" Display="Dynamic"></asp:RequiredFieldValidator>
                    <br/>
                    <asp:RegularExpressionValidator ID="validatorCedula2" runat="server"                                     
                                    ControlToValidate="taCi" Display="Dynamic"/>
           
                 </td>
                <td style="width: 87px">
                    <asp:TextBox ID="taUser" runat="server" Width="87px" MaxLength="20"></asp:TextBox>
                </td>
                <td style="width: 88px">
                    <asp:TextBox ID="taPassword" runat="server" Width="88px" 
                        TextMode="Password" MaxLength="20"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    Dirección</td>
                <td colspan="2">
                    <asp:TextBox ID="taAddress" runat="server" TextMode="MultiLine" Width="181px" 
                        Height="49px" MaxLength="900"></asp:TextBox>
                </td>
                <td>
                    <asp:Button ID="AddButton" runat="server" 
                        Text="Agregar" PostBackUrl="~/Views/Home/ListEmpleado.aspx?a=a" 
                        onclick="AddButton_Click" />
                </td>
            </tr>
        </table>
     
     
  
    </asp:Panel>


    
                
    
    
</asp:Content>